import { UserState } from "./../../model/userMap";
const initialUserState: UserState = {
  user: {},
};

export const userReducer = (
  state = initialUserState,
  action: { type: string; payload: any }
) => {
  switch (action.type) {
    case "SET_USER":
    case "LOGIN":
      return { ...state, ...action };
    default:
      return state;
  }
};
